package com.example.calendar.data.local

import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import com.example.calendar.data.local.dao.CategoryDao
import com.example.calendar.data.local.dao.EventDao
import com.example.calendar.data.local.dao.TaskDao
import com.example.calendar.data.model.CalendarEvent
import com.example.calendar.data.model.Category
import com.example.calendar.data.model.Task
import com.example.calendar.util.DateTimeConverters
import com.example.calendar.util.ListConverters

/**
 * Main database for the Calendar application.
 */
@Database(
    entities = [
        CalendarEvent::class,
        Task::class,
        Category::class
    ],
    version = 1,
    exportSchema = true
)
@TypeConverters(DateTimeConverters::class, ListConverters::class)
abstract class CalendarDatabase : RoomDatabase() {
    abstract fun eventDao(): EventDao
    abstract fun taskDao(): TaskDao
    abstract fun categoryDao(): CategoryDao
    
    companion object {
        const val DATABASE_NAME = "calendar.db"
    }
} 